<html lang="en">
 <head>  
  <title>桉树IBC官方APP</title> 
  <meta charset="UTF-8"> 
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> 
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> 
  <meta name="apple-mobile-web-app-capable" content="yes"> 
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="format-detection" content="telephone=no"> 
  <meta name="full-screen" content="yes"> 
  <meta name="x5-fullscreen" content="true"> 
  <meta name="applicable-device" content="mobile"> 
  <link rel="stylesheet" href="css/public.css"> 
  <link rel="stylesheet" href="css/move_ios.css"> 
  <link rel="stylesheet" href="css/move_andrioid.css">
  <script src="js/jquery-2.1.3.js"></script> 
  <script src="js/public.js"></script> 
 </head> 
 <body> 
  <section id="section1"> 
   <img src="img/ybaner.jpg" alt="" style="width: 100%;"/>
  </section> 
  <section id="section2"> 
   <a class="button1" href="javascript:;" target="_blank"><img src="img/apple.png" alt="">&nbsp;&nbsp;<span>iPhone版下载</span></a> 
   <a class="button2" href="javascript:;" target="_blank"><img src="img/man.png" alt="">&nbsp;&nbsp;<span>安卓版下载</span></a>
  </section>
  <script src="js/jquery-2.1.3.js"></script> 
  <script>	
  	var osUserAgent = navigator.userAgent.toLowerCase();
    	if (osUserAgent.indexOf("micromessenger") > -1 ) {
    		if(type == "ios"){
    			$('body').html('<div style="width:100%;height:12.06rem;background:url(img/wx_ios.jpg) no-repeat;background-size: cover;"></div>');
    		}
    		if(type == "android"){
    			$('body').html('<div style="width:100%;height:12.06rem;background:url(img/wx_android.jpg) no-repeat;background-size: cover;"></div>');
    		}
    	}else{
    		switch(type){
			case "ios":
				console.log(type);
				$(".button2").hide();
				break;
			case "android":
				console.log(type);
				$(".button1").hide();
				break;
			default:
				console.log("1");
				$(".button1").hide();
				$(".button2").hide();
				break;
	
		}
    		$("a").on('click', function(){
		    	var osUserAgent = navigator.userAgent.toLowerCase();
		    	if (osUserAgent.indexOf("micromessenger") > -1 ) {
		    		if(type == "ios"){
		    			$('body').html('<div style="width:100%;height:12.06rem;background:url(img/wx_ios.jpg) no-repeat;background-size: cover;"></div>');
		    		}
		    		if(type == "android"){
		    			$('body').html('<div style="width:100%;height:12.06rem;background:url(img/wx_android.jpg) no-repeat;background-size: cover;"></div>');
		    		}
            
			}else{
				    var t = Date.now();
				    setTimeout(function(){
				        if (Date.now() - t < 1200) {
							downloadApp(type);
				        }
				    }, 1000);
			    }
    		});
    		
    	}
	
  </script> 
  <div class="layui-layer-move"></div>  
 </body>
</html>